package cn.hxzy.springbootswagger;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

@RestController
@Api(tags = "hello控制器")
public class HelloController {
    @ApiOperation(value = "首页")
    @GetMapping("/")
    public String hello() {
        System.out.println("hello world !");
        return "hello world !!";
    }

    @ApiOperation(value = "测试一")
    @PostMapping("get1")
    public String get1(String id) {
        return id;
    }

    @ApiOperation(value = "测试二")
    @PostMapping("get2")
    public String get2(@RequestBody String id) {
        return id;
    }
}
